@model EIMS.Models.AccountViewModels.ProfileViewModel

@{
    ViewData["Title"] = "个人资料";
}

<div class="row">
    <div class="col-md-3">
        <partial name="_AccountNav" />
    </div>
    <div class="col-md-9">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0">个人资料</h4>
            </div>
            <div class="card-body">
                @if (TempData["StatusMessage"] != null)
                {
                    <div class="alert alert-success alert-dismissible fade show" role="alert">
                        @TempData["StatusMessage"]
                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                    </div>
                }

                <form asp-action="Profile" method="post">
                    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
                    
                    <div class="row mb-3">
                        <label asp-for="Username" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input asp-for="Username" class="form-control" disabled />
                            <span asp-validation-for="Username" class="text-danger"></span>
                            <small class="form-text text-muted">用户名不可修改</small>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="DisplayName" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input asp-for="DisplayName" class="form-control" />
                            <span asp-validation-for="DisplayName" class="text-danger"></span>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="Email" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input asp-for="Email" class="form-control" />
                            <span asp-validation-for="Email" class="text-danger"></span>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="PhoneNumber" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input asp-for="PhoneNumber" class="form-control" />
                            <span asp-validation-for="PhoneNumber" class="text-danger"></span>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="JobTitle" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input asp-for="JobTitle" class="form-control" />
                            <span asp-validation-for="JobTitle" class="text-danger"></span>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="CreatedDate" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input value="@(Model.CreatedDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "未记录")" class="form-control" disabled />
                            <small class="form-text text-muted">此字段不可修改</small>
                        </div>
                    </div>
                    
                    <div class="row mb-3">
                        <label asp-for="LastLoginDate" class="col-md-3 col-form-label"></label>
                        <div class="col-md-9">
                            <input value="@(Model.LastLoginDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "首次登录")" class="form-control" disabled />
                            <small class="form-text text-muted">此字段不可修改</small>
                        </div>
                    </div>
                    
                    <div class="row">
                        <div class="col-md-9 offset-md-3">
                            <button type="submit" class="btn btn-primary">保存更改</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    <partial name="_ValidationScriptsPartial" />
} 